<template>
  <div>
    <div class="one">
      <hr />
      <h6>请选择您的喜欢的专栏</h6>
      <div class="two">
        <span v-for="item in arr" :key="item">
          <input type="checkbox" :value="item" v-model="name" />
          {{ item }}
        </span>
        <div>
          <p v-for="res in name" :key="res">
            <span>{{ res }}</span>
          </p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      arr: ["科幻", "喜剧", "动漫", "冒险", "科技", "军事", "娱乐", "奇闻"],
      name: [],
    };
  },
  methods: {
    // fn() {
    //   this.name
    // },
  },
};
</script>

<style>
.one {
  padding-top: 20px;
  width: 1000px;
  /* height: 200px; */
  text-align: center;
  border: 1px solid red;
}
.two {
  padding-top: 20px;
  /* border: 1px solid red; */
}
</style>